@import "lib/styles/variable.scss";

.yui-table-wrap {
  position: relative;
  background: $white;
  border-radius: $radius;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.06), 0 4px 4px 0 rgba(0, 0, 0, 0.12);

  .yui-table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;

    &-head {
      line-height: 20px;
      color: $font-low-color;
      tr {
        th {
          padding: 10px;
          font-size: 12px;
          font-weight: 400;
        }
      }
    }
    &-body {
      line-height: 20px;
      tr {
        td {
          padding: 13px 10px;
          font-size: 14px;
          color: $font-color-default;
        }
      }
    }

    tr {
      text-align: left;
      border-bottom: 1px solid $tabel-border-color;
      &:hover {
        background: $Hover-color;
      }
    }

    &-order-wrap {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      .yui-table-order {
        display: flex;
        flex-direction: column;
        margin-left: 4px;
        .yui-table-icon {
          width: 20px;
          height: 20px;
          &:first-child {
            position: relative;
            bottom: -6px;
          }
          &:last-child {
            position: relative;
            top: -6px;
          }
        }
      }
    }

    &-empty {
      text-align: center;
      .default {
        display: flex;
        justify-content: center;
        padding: 20px 0;
      }
    }

    &.yui-table-bordered {
      border: 1px solid $B100;
      border-radius: 6px;
      th,
      td {
        border: 1px solid $B100;
      }
    }
    &.yui-table-compact {
      td,
      th {
        padding: 5px;
      }
    }
    &.yui-table-striped {
      .yui-table-body {
        tr {
          &:nth-child(even) {
            background: $B050;
          }
          &:hover {
            background: $H050;
          }
        }
      }
    }

    &-pager {
      display: flex;
      justify-content: flex-end;
      padding: 20px;
    }
  }

  .yui-table-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
    background: #fff;
    span {
      margin-left: 8px;
      color: $font-color-default;
    }
  }

  .yui-table-carbon {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
  }
}
